//
//  ButtonView.m
//  HJZWeiBo
//
//  Created by lanou on 16/5/28.
//  Copyright © 2016年 蒋晨成. All rights reserved.
//

#import "ButtonView.h"

@implementation ButtonView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.buttonOne = [UIButton buttonWithType:UIButtonTypeCustom];
        self.buttonOne.frame = CGRectMake(0, 0, kWidth / 2, 30);
//        self.buttonOne.backgroundColor = [UIColor redColor];
        self.buttonTwo = [UIButton buttonWithType:UIButtonTypeCustom];
        self.buttonTwo.frame = CGRectMake(kWidth / 2, 0, kWidth / 2, 30);
        
        self.buttonThree = [UIButton buttonWithType:UIButtonTypeCustom];
        self.buttonThree.frame = CGRectMake(0, 30, kWidth / 2, 30);
        self.buttonFour = [UIButton buttonWithType:UIButtonTypeCustom];
        self.buttonFour.frame = CGRectMake(kWidth / 2, 30, kWidth / 2, 30);
        
        UIImageView *lineOne = [[UIImageView alloc]initWithFrame:CGRectMake(kWidth / 2, 5, 1, 20)];
        lineOne.backgroundColor = COLOR(220, 220, 220, 1);
        UIImageView *lineTwo = [[UIImageView alloc]initWithFrame:CGRectMake(kWidth / 2, 35, 1, 20)];
        lineTwo.backgroundColor = COLOR(220, 220, 220, 1);
        UIImageView *lineThree = [[UIImageView alloc]initWithFrame:CGRectMake(10, 30, kWidth - 20, 1)];
        lineThree.backgroundColor = COLOR(220, 220, 220, 1);
        self.buttonOne.titleLabel.font = [UIFont systemFontOfSize:15];
        self.buttonTwo.titleLabel.font = [UIFont systemFontOfSize:15];
        self.buttonThree.titleLabel.font = [UIFont systemFontOfSize:15];
        self.buttonFour.titleLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:lineOne];
        [self addSubview:lineTwo];
        [self addSubview:lineThree];
        [self addSubview:_buttonOne];
        [self addSubview:_buttonTwo];
        [self addSubview:_buttonThree];
        [self addSubview:_buttonFour];
    }
    return self;
}


@end
